package com.woniu.command.materialClassificationTypeCommand;

import com.woniu.command.Command;
import com.woniu.command.handler.MaterialClassificationTypeCommandHandler;
import com.woniu.utils.ApplicationContextHolder;

public class DeleteMaterialClassificationTypeCommand implements Command<Long,Integer> {

    private MaterialClassificationTypeCommandHandler handler;
    public DeleteMaterialClassificationTypeCommand(){
        this.handler = ApplicationContextHolder.getApplicationContext()
                .getBean(MaterialClassificationTypeCommandHandler.class);
    }
    @Override
    public Integer  execute(Long id) {
        return handler.deleteMaterialClassificationTypeById(id);
    }
}
